<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <meta name="author" content="Flying hormone" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta charset="UTF-8">
        <link rel="stylesheet" href="../css/media.css" />
        <link rel="stylesheet" href="../css/mui.min.css" />
        <link rel="stylesheet" href="../css/head_foot.css" />
        <script type="text/javascript" src="../js/jquery-1.9.1.js"></script>
        <script type="text/javascript" src="../js/mui.min.js"></script>
        <script type="text/javascript" src="../js/appcan.js"></script>
        <script type="text/javascript" src="../js/appcan.control.js"></script>
        <script type="text/javascript" src="../js/common.js" ></script>
		<title>支付</title>
		<style>
		    div{  position: relative;}
		    header,.zhifu_info{ margin-bottom: 0.5em;}
		    .zhifu_info .rightbottom{ position: absolute; right: 1em; bottom:1em;}
		    .zhifu_info{ padding:1em;  width: 98%; margin-left: 1%; height: 9em; background: #fff;}
		    .querenzhifu{ clear:both; width: 98%; font-size: 1.2em; padding: 0.2em; margin-left: 1%; border-color: #fff; color: #fff; background: #ff3366; border-radius: 0.2em;}
		    
		    .mui-checkbox.mui-left label, .mui-radio.mui-left label{ line-height: 2em; height: 2em; font-size: 1.2em;}
		    .mui-checkbox.mui-left input[type=checkbox], .mui-radio.mui-left input[type=radio]{
                font-size: 2em;
                top: 0.25em;
            }
            .mui-radio input[type=radio]:before{ font-size: 1em;}
            .mui-radio.mui-left label{ padding-left: 2.5em;}
            
            .mui-checkbox input[type=checkbox]:checked:before, .mui-radio input[type=radio]:checked:before{ color: #ff3366;}
            .zhifufangshi>div:first-child{ border-bottom: 1px solid #ccc;}
            .zhifufangshi{ height: auto; overflow: hidden; margin-bottom: 3em; background: #fff;}
            .zhifufangshi div{ padding:0.5em;}
		</style>
	</head>
	<body>
	    <header>
            <a><span class="leftleft"></span></a>
            <h1 id="title">支付</h1>
        </header>
        <div class="zhifu_info">
            <span id="">支付信息</span>
            <p class="rightbottom">￥<i id="amount">0.00</i>元</p>
        </div>
        <div class="zhifufangshi">
            <div class="mui-input-row mui-radio mui-left">
                <label>支付宝支付</label>
                <input name="radio1" type="radio" checked="checked">
            </div>
        </div>
        
                
        <button class="querenzhifu">确认支付</button>

        <footer>
            <nav class="mui-bar mui-bar-tab">
                <a href="javascript:;" id="tcIndex">
                    <img src="../img/shouye2.png" />
                    <span class="mui-tab-label">首页</span>
                </a>
                <a href="javascript:;" id="myfabu">
                    <img src="../img/fabu2.png" />
                    <span class="mui-tab-label">发布</span>
                </a>
                <a class="action" href="javascript:;" id="myInfo">
                    <img src="../img/mine2.png" />
                    <span class="mui-tab-label">我的</span>
                </a>
            </nav>
        </footer>
            
        <script>
            $(document).ready(function(){
                var param = appcan.locStorage.getVal("param");
                var p = $.parseJSON(param);  
                var actId = p.param.id;
                var num = actId + new Date().getTime(); //测试需修改单号,避免已经支付的问题
                var amount = p.param.amount;
                $("#amount").html(amount);
                $(".querenzhifu").click(function(){
                    var partner = "2088521594227441";
                    var seller = "15855840237@163.com";
                    var rsaPrivate = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCz5imAZtqo4Vph0W/BM2rM5H5UlYe95fuo9wiRbS4LYp5tPCxwgB8LJmhFPrrGbfWYb8KW062PCPZq+RW5aDh84UsQLi1oA+WEMr3/xbFVYAT8IloZ4QKk+jSjE2L9ycEOthzZugXfaX9Ssj7U9+0XICctgT9x99uomJcq+QfXUP112AKKWkvjfZnECXktbIkQTJgqsN3vVs01nJ5q81QgBye/rsiWjMAmAMx5kfxICfTrZ3ePynxt4g5GB8YRCMIx/F4GpvAwk8Rm8oAvkONuwD8fmhSxU7JaLABxPm52HhPUoxW188BP9j3MIF1kUCyV2APiEkQ8ZkyjDvJ73ymZAgMBAAEC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UwHdkwoj3XwZioOfYFWvwql5DlMUB+44DzXdoHhXX1dh4zapLBVUZ84vAKZ4aLEBFGNkG4TvErXUxrFs7jk/pgoux/xewv22g86UVIfQK8QsQWc6lWBr/h2F5fEWsQqPE0Fb2lE7O7xGQt4D8pM=";
                    var rsaPublic = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs+YpgGbaqOFaYdFvwTNqzOR+VJWHveX7qPcIkW0uC2KebTwscIAfCyZoRT66xm31mG/CltOtjwj2avkVuWg4fOFLEC4taAPlhDK9/8WxVWAE/CJaGeECpPo0oxNi/cnBDrYc2boF32l/UrI+1PftFyAnLYE/cffbqJiXKvkH11D9ddgCilpL432ZxAl5LWyJEEyYKrDd71bNNZyeavNUIAcnv67IlozAJgDMeZH8SAn062d3j8p8beIORgfGEQjCMfxeBqbwMJPEZvKAL5DjbsA/H5oUsVOyWiwAcT5udh4T1KMVtfPAT/Y9zCBdZFAsldgD4hJEPGZMow7ye98pmQIDAQAB";
                    var notifyUrl = "tc100";
                    uexAliPay.setPayInfo(partner, seller, rsaPrivate, rsaPublic, notifyUrl);
                    
                    var subject = "同城100发布费用";
                    var body = "同城100发布费用";
                    var fee = amount;
                    uexAliPay.pay(num, subject, body, fee, function(error,data){
                        if(!error){
                            appcan.ajax({
                               type:"post",
                               async:false,       
                               url:host+"/publicAct.json",
                               data:param,
                               dataType:"json",
                               contentType: "application/json",
                               success : function(dataResult) {
                                    result = dataResult;
                                    alert("操作成功");
                                    openUrl("../index.html","index");
                                    /*
                                    if(obj == "preview"){
                                       if(result.status > 0){
                                            openUrl("../page/info.html?actId="+actId,"page_info");
                                       }
                                    }else{
                                       if(result.status > 0){
                                            openUrl("../index.html","index");
                                       }
                                   }*/
                                    
                               }
                           })
                        }else{
                            alert(data);
                        }
                    }); 
                });
            });
        </script>
	</body>
</html>
